package com.easy.query.test.entity.school.dto.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import com.easy.query.test.entity.school.dto.SchoolClassVO;
import com.easy.query.core.proxy.columns.types.SQLStringTypeColumn;
import com.easy.query.core.proxy.columns.SQLNavigateColumn;
import com.easy.query.core.proxy.columns.SQLManyQueryable;
import com.easy.query.core.proxy.columns.types.SQLAnyTypeColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author easy-query
 */
public class SchoolClassVOProxy extends AbstractProxyEntity<SchoolClassVOProxy, SchoolClassVO> {

    private static final Class<SchoolClassVO> entityClass = SchoolClassVO.class;

    public static final SchoolClassVOProxy TABLE = createTable().createEmpty();

    public static SchoolClassVOProxy createTable() {
        return new SchoolClassVOProxy();
    }

    public SchoolClassVOProxy() {
    }

    /**
     * {@link SchoolClassVO#getId}
     */
    public SQLStringTypeColumn<SchoolClassVOProxy> id() {
        return getStringTypeColumn("id");
    }

    /**
     * {@link SchoolClassVO#getName}
     */
    public SQLStringTypeColumn<SchoolClassVOProxy> name() {
        return getStringTypeColumn("name");
    }

    /**
     * {@link SchoolClassVO#getSchoolStudents}
     */
    public SQLManyQueryable<SchoolClassVOProxy, com.easy.query.test.entity.school.dto.proxy.SchoolStudentVOProxy, com.easy.query.test.entity.school.dto.SchoolStudentVO> schoolStudents() {
        return getNavigateMany("schoolStudents", new com.easy.query.test.entity.school.dto.proxy.SchoolStudentVOProxy());
    }

    /**
     * {@link SchoolClassVO#getSchoolTeachers}
     */
    public SQLManyQueryable<SchoolClassVOProxy, com.easy.query.test.entity.school.dto.proxy.SchoolTeacherVOProxy, com.easy.query.test.entity.school.dto.SchoolTeacherVO> schoolTeachers() {
        return getNavigateMany("schoolTeachers", new com.easy.query.test.entity.school.dto.proxy.SchoolTeacherVOProxy());
    }


    @Override
    public Class<SchoolClassVO> getEntityClass() {
        return entityClass;
    }


    /**
     * 数据库列的简单获取
     *
     * @return
     */
    public SchoolClassVOProxyFetcher FETCHER = new SchoolClassVOProxyFetcher(this, null, SQLSelectAsExpression.empty);


    public static class SchoolClassVOProxyFetcher extends AbstractFetcher<SchoolClassVOProxy, SchoolClassVO, SchoolClassVOProxyFetcher> {

        public SchoolClassVOProxyFetcher(SchoolClassVOProxy proxy, SchoolClassVOProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
            super(proxy, prev, sqlSelectAsExpression);
        }


        /**
         * {@link SchoolClassVO#getId}
         */
        public SchoolClassVOProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         * {@link SchoolClassVO#getName}
         */
        public SchoolClassVOProxyFetcher name() {
            return add(getProxy().name());
        }


        @Override
        protected SchoolClassVOProxyFetcher createFetcher(SchoolClassVOProxy cp, AbstractFetcher<SchoolClassVOProxy, SchoolClassVO, SchoolClassVOProxyFetcher> prev, SQLSelectAsExpression sqlSelectExpression) {
            return new SchoolClassVOProxyFetcher(cp, this, sqlSelectExpression);
        }
    }

}
